﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DomainDriver.DomainModeling.DomainObjects;

namespace AutomotivePricingModel.DriveTrainTypes
{
    public partial class DriveTrainType : EnumDomainObject<DriveTrainTypeEnum, DriveTrainType>
    {
        private string m_DisplayName;

        public DriveTrainType()
            : this(DriveTrainTypeEnum.AllWheelDrive)
        { }

        public DriveTrainType(DriveTrainTypeEnum driveTrainType)
            : this(driveTrainType, Enum.GetName(typeof(DriveTrainTypeEnum), driveTrainType))
        { }

        public DriveTrainType(DriveTrainTypeEnum driveTrainType, string displayName)
            : base(driveTrainType)
        {
            m_DisplayName = displayName;
        }

        public string DisplayName
        {
            get { return m_DisplayName; }
            set { m_DisplayName = value; }
        }

        public override void CopyTo(DriveTrainType otherObject)
        {
            base.CopyTo(otherObject);
            if (otherObject.m_DisplayName != m_DisplayName)
            { otherObject.m_DisplayName = m_DisplayName; }
        }

        public override bool Equals(DriveTrainType otherObject)
        {
            if (otherObject.m_DisplayName != m_DisplayName)
            { return false; }
            return base.Equals(otherObject);
        }
    }
}